const singer = [{
		name: '周杰伦',
		age: 34
	},
	{
		name: '许嵩',
		age: 34
	},
	{
		name: '邓紫棋',
		age: 44
	},
	{
		name: '张碧晨',
		age: 44
	},
	{
		name: '薛之谦',
		age: 44
	},
	{
		name: '封茗囧菌',
		age: 44
	},
]
// Array.prototype.my_every = function(callback) {
// 	const res = []
// 	for (let i = 0; i < this.length; i++) {
// 		if (!callback(this[i], i, this)) {
// 			return false
// 		}
// 	}
// 	return true
// }

Array.prototype.my_every = function(callback) {
	let count = 0;
	for (let i = 0; i < this.length; i++) {
		callback(this[i], i, this) && count++
	}
	return this.length === count;
}

const newSinger = singer.my_every((item, index, arr) => {
	return item.age > 40
})
console.log(newSinger); //false
